<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>

		<script type="text/javascript">
			// 5.声明一个不定参数的函数，计算所有传入参数的和。
			function count() {
				let sum = 0;
				if (arguments) {
					for (let i = 0; i < arguments.length; i++) {
						sum += arguments[i];
					}
				}
				console.log(sum);
			}
			count(111,222,333);	//666
		</script>
	</body>
</html>
